package com.ruoyi.wcf.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wcf.mapper.WcfFitterMapper;
import com.ruoyi.wcf.domain.WcfFitter;
import com.ruoyi.wcf.service.IWcfFitterService;

/**
 * 产品适配Service业务层处理
 *
 * @author WZP
 * @date 2022-04-02
 */
@Service
public class WcfFitterServiceImpl implements IWcfFitterService
{
    @Autowired
    private WcfFitterMapper wcfFitterMapper;

    /**
     * 查询产品适配
     *
     * @param fitterId 产品适配主键
     * @return 产品适配
     */
    @Override
    public WcfFitter selectWcfFitterByFitterId(Long fitterId)
    {
        return wcfFitterMapper.selectWcfFitterByFitterId(fitterId);
    }

    /**
     * 查询产品适配列表
     *
     * @param wcfFitter 产品适配
     * @return 产品适配
     */
    @Override
    public List<WcfFitter> selectWcfFitterList(WcfFitter wcfFitter)
    {
        return wcfFitterMapper.selectWcfFitterList(wcfFitter);
    }

    /**
     * 新增产品适配
     *
     * @param wcfFitter 产品适配
     * @return 结果
     */
    @Override
    public int insertWcfFitter(WcfFitter wcfFitter)
    {
        wcfFitter.setCreateAt(new Date());
        return wcfFitterMapper.insertWcfFitter(wcfFitter);
    }

    /**
     * 修改产品适配
     *
     * @param wcfFitter 产品适配
     * @return 结果
     */
    @Override
    public int updateWcfFitter(WcfFitter wcfFitter)
    {
        wcfFitter.setUpdateAt(new Date());
        return wcfFitterMapper.updateWcfFitter(wcfFitter);
    }

    /**
     * 批量删除产品适配
     *
     * @param fitterIds 需要删除的产品适配主键
     * @return 结果
     */
    @Override
    public int deleteWcfFitterByFitterIds(Long[] fitterIds)
    {
        return wcfFitterMapper.deleteWcfFitterByFitterIds(fitterIds);
    }

    /**
     * 删除产品适配信息
     *
     * @param fitterId 产品适配主键
     * @return 结果
     */
    @Override
    public int deleteWcfFitterByFitterId(Long fitterId)
    {
        return wcfFitterMapper.deleteWcfFitterByFitterId(fitterId);
    }
}
